//
//  NationalInforTableViewCell.swift
//  Exchange
//
//  Created by 孟祥群 on 2018/4/19.
//  Copyright © 2018年 common. All rights reserved.
//

import UIKit
import SpriteKit
class NationalInforTableViewCell: BaseTableViewCell {
    
    
    lazy var inforLabel: BaseLabel = {
        let label = BaseLabel(style: .twiceStyle)
        label.font = UIFont.systemFont(ofSize: 15)
        return label
    }()
    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func setUpUI() -> Void {
        super.setUpUI()
       self.nameLabel.text = ""
        
       self.contentView .addSubview(inforLabel)
        inforLabel.text = ""
        inforLabel.snp.makeConstraints { (make) in
            make.centerX.equalToSuperview()
            make.centerY.equalToSuperview()
        }
        
    }
    
    func setAdverStyle() {
        self.nameLabel.font = UIFont.systemFont(ofSize: 12)
        self.inforLabel.snp.remakeConstraints { (make) in
            make.left.equalToSuperview().offset(86)
            make.centerY.equalToSuperview()
        }
        
        self.contentView.addSubview(self.kindLabel)
        self.kindLabel.snp.makeConstraints { (make) in
            make.centerY.equalToSuperview()
            make.right.equalToSuperview().offset(-47)
        }
        self.setArrowImage()
    }
    
    func changeInforColor(text:String) {
        if text.count != 0 {
            self.inforLabel.themeTextColor = ThemeManager.ThemeColorKeys.text1
            self.inforLabel.font = UIFont.systemFont(ofSize: 15)
        }else {
            self.inforLabel.font = UIFont.systemFont(ofSize: 13)
            if ThemeManager.default.currentThemeMode() == .night {
                self.inforLabel.textColor  =  UIColor(hexStr: "#616979")
            }else {
                self.inforLabel.textColor  = UIColor(hexStr: "#b1b2b2")
            }
        }
        
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
